package com.limeng.server;

import java.io.IOException;

public abstract class HttpServlet implements Servlet {

    public abstract void doGet(Request request, Response response) throws Exception;

    public abstract void doPost(Request request, Response response) throws Exception;

    @Override
    public void init() {

    }

    @Override
    public void destory() {

    }

    @Override
    public void service(Request request, Response response) throws Exception{
        String method = request.getMethod();
        if(method.equalsIgnoreCase("GET")){
            doGet(request,response);
        }else{
            doPost(request,response);
        }
    };


}
